Yes, whether pregnant or breastfeeding, acyclovir and valacyclovir are considered safe to use.