General advice I've read and heard isn't suggesting that you tackle opponents rated 800 points higher than you game after game, but instead looking more at opponents rated a couple hundred points stronger. The 200-rating-point difference - on average - amounts to a winning probably of 75% for the stronger side, 25% for the weaker side. So, you should be able to play games in which you're not always strictly simply fighting for survival but games in which you're doing some of the attacking as well.
Learning by playing stronger opponents?
You should be taking note of what they are doing, and that's how you learn "attack."
But really, chess isn't so easily delineated into "he's playing attack and I'm playing defense" anyway.

As DrawMaster said, play against opponents slightly higher rated than you. Also, realize that sometimes the best defense really is a good offense. Counterattacking is sometimes the best way to meet a threat. And be sure to study your games afterward, preferably with your opponent and/or a stronger player, so they can point out your mistakes.
The usual advice for those seeking to improve their game seems to be to play against stronger opponents. I can see where this would develop one's defensive skills, but what about attacking skills? How can you learn to attack when every game you play finds you completely preoccupied with defense? I would really appreciate comments from other players who have run into this problem, and especially anyone who has managed to come up with a solution.