It sounds to me like The Dr should be looking at other issues as well. I never had a problem with weight gain in my boys and both breast fed for around two years. I would not let my child not eat for that long no matter what a pediatrician said!! Keep in mind that the pedi is just a person too and can make mistakes.
Formula is not the end all be all either. If the baby will not take the bottle or a sippy cup I would be EXTREMELY uncomfortable in weaning him. PLEASE talk to a lactation consultant. Pediatricians do not have a background in breast feeding or nutrition!!!
Also try to get a second opinion on this. It sounds like they are saying it is just the breast feeding causing the issue. If there is an underlying problem and you wean him you will be stuck with it even if that does not "fix" the problem. If he has been fine up until now maybe he is hitting his normal growth stride. Are you or his father small people? were either of you small when you were children?
The Doctor needs to do what he/she feels is best for the baby but they might not have all the answers on this one. Make sure that that you optimize the breast milk quality and that your baby is getting the hind milk (the later part of a full feeding) rich in fat. If your son eats table foods why not increase the calories from that source?? IMO (not a DR) Breast feeding should not be stopped as it is one of the best ways to provide nutrition through the first year of life! The APA recommends breast feeding for at least 12 months for a reason.
Best Wishes & God Bless,
R.