Is there any prescription that is safe to take for IBS when breastfeeding?

Not when breast feed. I don't believe than any weight loss deugsmaremsafe. But especially when you are breast feeding, you don't want your baby to get any drugs through your milk.
Diet. I don't use any meds for ibs ever. Consistent meal times, high fiber diet, 80-100 ounces of non caffeinated, non alcoholic fluids daily, 20 additional ounces per day to compensate for breast feeding and this almost always does the trick. This should be continued once you stop breast feeding and the majority of ibs symptoms will be controlled.