Is it safe to use dandruff shampoos while pregnant?

Probably safe. But in my opinion I would wait until 8 weeks of gestation. While most of the active ingredients are harmless, many of the other ingredients effects are less well described.