Male dogs can become fertile and cause pregnancy as early as 6 months of age, though this varies by breed and individual.
Sexual maturity does not equal emotional maturity. Neutering can prevent unwanted pregnancies.
To prevent accidental breeding: keep male dogs leashed or secure, be mindful of females in heat, and consider neutering. Talk to your veterinarian about the best course of action.