If your doctor, having noticed that your daughter isn't gaining enough weight, has suggested you supplement with formula, then it sounds as if your milk supply is not sufficient.
There are things you can do to help stimulate your supply such as pumping, having baby nurse more frequently or taking certain supplements (ie. fenugreek) - a lactation consultant (your profile doesn't say where you are located, so I'm not sure where to refer you) would be able to properly advise you on that.
The cause for an insufficient milk supply isn't often apparent.....and somtimes cannot be rectified.
I wish you all of the best with this. I'm currently breastfeeding my 6 month old and so I know what it's like to want to do that for your child.
This same situation happened with my son when he was a baby. He breastfed well at first but, then hit a stump in his weight gain, as he was born 9 lbs and gained well after that. I started to supplement with formula bottles but then he wouldnt take my breast anymore, he would just take bottles.
I eventually figured out that it is much easier for a baby to get milk out of the bottle then it is to suck from your breast.
Milk from a bottle just flows, so she may have decided that she prefers significance of the bottle over the breast like my son did. It may not even be your milk supply any more. If so you can pump your milk and give it to her in a bottle. thats what i did with my son, I pumped and gave him atleast a bottle a day until he was like 6 months. He's 15 months now and big and healthy.
its a little more complicated but atleast she'll get the benefit, even for as long as you do it for- every bit of breast milk helps and delivers benefits so as long as you feel you can keep it up.
Hope this helps.