EDIT to say
DO NOT STOP taking it without talking to your doctor. You must be weaned off of this medication. Stopping suddenly can cause very serious complications.
Everything I find says not to use it in pregnancy because it can cause birth defects or abortion.
At the same time, it can be used in cases where the need for the drug outweighs the risk to the fetus. It is commonly used to help the lungs develop if preterm birth is imminent. I would discuss this with your doctor until you are satisfied with your knowledge and their reasoning behind using it.
Never be afraid to question a doctor. They won't think you are questioning their ability. Doctors know that a good patient is one that wants to be informed and make decisions about their health care. You should always ask any possible questions you may have so that you are getting reliable medical information and the reasons behind why your doctor chose that medication and why there aren't other options.