Yes, it's safe. In fact, it's unsafe not to take thyroid medication during pregnancy if you need it. Whether you have hypothyroidism (an underactive thyroid) or the much less common hyperthyroidism (an overactive thyroid), you'll probably need to take medication and be closely monitored.
The most common reason expecting moms take thyroid medicine is to treat hypothyroidism – when your thyroid gland doesn't produce enough thyroid hormone. You have to take medicine and maintain it normal.
During pregnancy, the thyroid gland needs to produce about 40 percent more thyroid hormone for both you and your developing baby. Women who don't receive enough thyroid hormone during pregnancy are at greater risk of complications, Hypothyroidism, an underactive thyroid, increases the risk of pregnancy complications, such as miscarriage, still birth, infertility, maternal anemia, pre-eclampsia, placental abruption, postpartum hemorrhage, premature delivery, low birth weight and deficits in intellectual development in infants.
So its mandate to take medication and maintain it normal.
My advice is to continue medicine and consult doctor regularly for normal pregnancy.