Is it safe to take medication for allergies while pregnant?

Yes. Speak with your physician first and clarify the medications that you must take. There are allergy medications that are class b in pregnancy and as best we can tell are safe to use in pregnancy.
Yes, it is. Medications that are safe include Loratadine and Cetirizine (class b) nasal steroids (only budesonide=rhinocort is class b), but the others are ok. Oral decongestants (pseudoephedrine) should be avoided during the first trimester. Nasal decongestants such as oxymetazoline (afrin) are ok for no more than 5 days. Allergy shots can continue without change of the dose.