Is it unsafe to pick up dog poop in pregnancy?

Not unsafe. You should be fine picking up dog poop (using sanitary means-plastic bags, etc) when pregnant.
No. Pregnant women should not pick up cat feces as it can carry toxoplasmosis which can be harmful to an unborn baby. Wear gloves when gardening and wash hands after because the soil may contain toxo from cat feces. Dog feces usually does not have toxoplasmosis. That said, I would recommend using a plastic bag to pick up the dog poop and would wash my hands as soon as possible.