Now, a lot of people say "Never kill an enemy if you are going to die after doing it." Those people are wrong. However, you should know WHEN to do it, because you can screw it up and feed the enemy as much as, if not more than, you get.
Assuming that the enemy is weakened and fleeing into towers and you are weak enough the towers may kill you trying to leave (after the kill), here are some questions to ask:
Can I kill them for sure, even if I'm being hit by all the towers in range and the DG? If no, don't do it. Just becausee some people don't AA in towers doesn't mean that others aren't smart enough to realize if they can't run, they can do more damage by attacking you in the towers.
Are there any other enemy DGs around? If 1, it's probably a bad idea; you will get a kill, and then the other DG will kill you, so all that happened is that both teams got more cash. However, it is possible that you can give the enemy you killed gold as long as his death animation is still playing, so you could feed more than you get. If there are two enemy DGs around that aren't your target, don't do it. One, a 3v1 is a bad idea, and two, they will always get more money out of it.
Are you behind or ahead? If behind, it's probably a good idea to take risks. If ahead, play it safe; another enemy may be coming round the corner and gank you, and that could set off the enemy comeback.
Do you really need gold right now? Gold is always great, I admit. But, like the above, if you don't absolutely need gold right now, it may not be the best idea to chase an enemy because unexpected things can happen.
So basically, if you don't need the kill now for your success, or if you aren't entirely sure it is a 1v1 against the enemy DG, or if you aren't entirely sure you will kill him and get killed by the towers after his death animation finishes at the earliest (preferably not at all, of course), then don't go for a suicidal kill. But if you know you are going to die to the towers and can afford the risk, do it. A kill and a good amount of EXP for you is great, and since you and an enemy will be out of the game, it doesn't adversely affect you much.