yes definitely. While it is always preferable to simply subdue your attacker and escape so that proper charges can be brought against him, I would definitely say that a woman(or man in some rare instances) is fully justified in using lethal force to protect herself from a rapist. After all, as others have pointed out, there is no guarantee that the guy won't kill her when he's done or horribly injure her in the process.
I think where the debate would really come up is if you were certain there was no threat to your life from the rapist and still killed them. As for me I would personally say that if someone is trying to rape you then, even if there is no chance of your attacker killing you(and you are aware of this) you are still justified in using lethal force to defend yourself. It's what I would do(at least I'd like to think so).
I feel with rape or attempted rape one shouldn't pull any punches in order to defend oneself. You really don't have the time to stop and think about how to best subdue someone without killing them. All you can do is yell, kick, scream, punch, bite, and use any object available to you as a weapon to wail on him with until you can break free and run for help. If in the process you wind up killing him, then hey, one less sexist jerk in the world.(in truth I would like to use some more colorful words to describe such a guy who would rape a woman but if I did that I'd have so many that I would probably break the rf profanity filter.
)