In a matter of biology, yes. But in terms of safety and size, not always.
If the smaller dog is female, her giving birth to larger dogs could kill her, so it would be wise to avoid that situation.
The safer way would be for the smaller dog to be male, so that the puppies wouldn't put the mother ad risk. The new problem would be the smaller dog being able to reach.