You can get a safe, mild wormer from your vet. It's not only possible to worm a pregnant female, it's a good idea, but the wormer MUST be a mild, safe one. PLEASE don't go buy one over the counter from a grocery store or pet store. You need a wormer like Nemex II (sold by vets) so that it doesn't harm the babies.
She's going to be devoting most of her reserves to the puppies while she's pregnant, you certainly don't want her to be feeding a worm infestation as well. Nemex II is mild, safe and very effective against round worms. Your vet will give you the correct dose for your dog's weight.
Ghilly