Don't stop nursing. Your doctor is insensitive, and dumb, if he told you you would have to. Maybe you should find another one, but right now, you have to feel better first. Are you sure you had mastitis? Did you have a red mark with red streaks on your breast? Was there a lump? Did you have a high fever? Did it come on very fast, and did you feel like you had the flu?
You could have thrush, since you described pain on your nipple. If this is the case, you can take an antibiotic, or treat it naturally. If it is thrush, your baby will probbaly have it as well, is his tongue white? Is his latch different, as if it hurts him to nurse?
I would get a second opinion. First off, don't let that breast get full at all, nurse on it like crazy. If it is mastitis, draining it will help. Don't lay on your belly when you sleep either, it can cause blocked milk ducts. But most importantly, don't stop nursing!!!
Both thrush and mastitis are yucky, I've had both a few times. Hang in there........just nurse a lot, and take a very warm shower, and rub the breast that hurts in a circular motion, to break up the blocked duct. I guess still take the antibiotic. Is diflucan safe to nurse with? I suggest getting the Breastfeeding Book, by Dr. Sears, it has tons of great helpful tips for all of these things, it's good to have on hand. i hope you feel better, let me know what happens.