Female dogs never lose their ability to bear puppies; there is no menopause in the canine world. But fertility does decrease with age, resulting in smaller — and fewer — litters. In addition, puppies born to older dogs are more likely to have congenital defects, and there can be complications with whelping (labor).
Most dogs should be spayed by the age of six months, at any rate. They are significantly more prone to developing cancer of the mammary glands if they are not spayed before their first heat (which tends to occur between the ages of six and 12 months).