Antoinetta,
Welcome Antoinetta! I am not a female but am sure that no Doctor would suggest being on pain meds and breastfeeding at the same time, in fact, I would say that he or she would dissuade you from breastfeeding for a period of time well after you are off your pain meds.
If you know anything about how the circulatory system works pain meds given by mouth or given intravenously take a while to completely come out of the bloodstream. As such, any drugs (including aspirin! in fact that is why drinking alchohol or smoking is frowned upon by women who are actively breastfeeding) given to you will be breastfed to your baby!
If you do not want to bottlefeed, you should see about a wet nurse, women who are breast feeding babies themselves. In America, you can contact La Leche League. There must be an equivalent in Spain, I'm sure.
Mike
P.S. You should check in all cases with your Doctors and other women on the ANA forum.