Many think that, at the end of a close game, they should change their tactics because of the score. I remember one player assuring me that, "When it's close, everyone knows you should play safe." When I asked him why that would be the right tactic, he said, "If you play safe, you won't mess up." I pointed out that if that were true, it would be true regardless of the score. He argued back that when it's close, you'll make more mistakes, so it's best to play safe. I asked him whether, under pressure, a player would be more nervous going for a consistent attack - where he is in control of what he's doing - or having to react to the opponent's attack, where he's not in control, and so is facing the unknown. He didn't have an answer for that, and didn't seem to get the idea that if you play safe, the opponent gets to play aggressive, and in the modern game of table tennis, the aggressor usually wins - and even more so under pressure!
So what should you do differently when it is close? Say the score is deuce in the fifth. There are only two things that change here.
First is psychological. If you are nervous, then you are likely to make more mistakes than usual. That sort of plays into the myth of "Play safe when it's close," except it doesn't take into account that: 1) the opponent might be even more nervous; 2) a nervous player likely makes more mistakes reacting to an opponent's shot (i.e. his attack) then attacking himself; and 3) the best way to overcome nervousness when it's close is to play your game, whether attacking or not, and so get used to playing under pressure. So in general, when it's close, it's best to take the initiative, using whatever part of your game you do best - and that usually means playing aggressively. (The attacker is taking the "risk" of taking the first shot, where if he misses the opponent doesn't even have to react to his shot, but this is usually more than offset by the factors given above. The exception, of course, is for a defensive player, who might want to focus on his defense and let the other guy make a mistake.)
Second is tactical, as in "No hold back." It's time now to use whatever worked before. If you have a serve that's worked well throughout the match, which you've been holding back on some so the opponent won't get used to it, now is the time to bring it out. Some players hesitate to do so, thinking the opponent will be expecting it, and that's occasionally true. However, the great majority of the time he won't be sure, and if he had trouble before, he'll probably have trouble again. If you don't use it, the likely scenario is that, after the match, he'll wonder why you didn't use that serve at the end, and if you lose, you'll be kicking yourself over not using it - and rightfully so. If a certain serve, stroke, or placement gave the opponent trouble, now's the time to use it! In general, with experience you get a feel for what tactics to bring back at the end of a close game.
Ultimately, the best tactic at the end of a close game is more long-term strategic - play lots of matches so you are often playing close games, maybe even play improvised games where you start each game at deuce. Then you will become comfortable and experienced in what to do in a close game, and the tactics will come naturally.