The Roman Catholic Magisterium has never taught that contraceptives -- in this case ABORTIFACIENT contraceptives -- are moral to use, in advance of a possible rape. It is not moral to plan ahead so that you murder an innocent prenatal in case of rape.
As for contraception itself, it is intrinsically evil, just as abortion is intrinsically evil, though abortion is worse.
In the case of the nuns, taking a contraceptive pill IN NO WAY prevents or defends against the rape. They are only trying to avoid the "negative" consequences of having to bear and raise a child.
If a woman is raped and she goes to a Catholic hospital emergency room, it is moral -- depending on the medical circumstances -- to attempt to prevent conception by a contraceptive, as long as the physician can be morally certain that the contraceptive will not act as an abortifacient in this case. The reason that this act of preventing conception is not intrinsically evil contraception is complex. See my new post:
Direct abortion and direct sterilization are intrinsically evil and always gravely immoral. However, indirect abortion and indirect sterilization are NOT intrinsically evil, and may be moral in some circumstances. The same can be said for contraception. When it is direct (almost all cases), it is intrinsically evil and always gravely immoral. But if it is indirect, as when contraception is used to interrupt (in moral terms) a rape, it can be moral.