I can't believe there are so many ignorant doctors out there! I would relay the information DJ's mom stated (the AAP and World Health Organization's recommendations to breastfeed for AT LEAST one and two years respectively), then I'd find myself a new doctor.
Medical school still does not teach much about breastfeeding, so what pediatricians know about it is what they've chosen to learn (and apparently your doctor skipped it entirely!). Even the peds who are considered to be knowledgeable about nursing still have usually devoted a mere 8 hours to a class in breastfeeding out of those 8 or more years of schooling (I've gotten a dozen times that in hospital classes and LLL meetings!). A good doctor either has made the effort to become educated about breastfeeding (beyond the info pamphlets the formula companies send) or can refer you to an IBCLC lactation consultant for expert advice.
I love this quote:
"Parents and health professionals need to recognize that the benefits of breastfeeding (nutritional, immunological, cognitive, emotional) continue as long as breastfeeding itself does, and that there never comes a point when you can replace breast milk with infant formula, cows' milk or any other food, or breastfeeding with a pacifier or teddy bear, without some costs to the child."
-- KA Dettwyler, "Beauty and the Breast" from Breastfeeding: Biocultural Perspectives