Tea tree oil while pregnant ?

Can I use tea tree oil in my hair while pregnant? I’m 29 weeks and few days .