UTI Meds & Early Pregnancy

Today I was prescribed UTI medication known as Nitrofurantoin. I am 10 DPO and have had multiple faint positive pregnancy tests. Is it safe to take my medication? I’m worried that it’s so early in the pregnancy that something could happen. Thanks!