Is it safe to take forteo while pregnant or breastfeeding?

No. Forteo changes your parathyroid hormone levels. It has never been tested in pregnancy. The prescription of the drug is essentially incompatible with the period of life when a women is fertile. It should not be used in pregnancy or lactation.. If you have accidentally used it for a short time when pregnant, you should know that it seems unlikely to cause harm but this is certainly unproved.
I wouldn't recommend. Pregnancy category c is given to medicines that have not been studied in pregnant humans but that do appear to cause harm to the fetus in animal studies. Forteo has not been studied in human and appears to cause harm to the unborn baby in animal studies and falls in this category.