It doesn't sound safe, but check with your doctor.
This kind of thing is usually a matter of weighing the risks and benefits.
Is the danger to the baby from taking prozac because of the chemicals more or the less than the danger of not taking prozac because of the mental effects (if you stopped taking it, is it possible that you would do something to hurt yourself or your baby?)