Thanks for your query.Based on the facts that you have posted it appears that you have red bumps on glans
of your penis.
These are most likely to be due to infection of glans of your penis due to dry rough handling of your genital while masturbating.
Please take broad spectrum antibiotics along with anti inflammatory medication like Diclofenac
twice daily along wth topical antibiotic
ointment like Neosporin
Get the prescription of medicines from your family Physician.
Ensure to clean your genitals with warm water twice daily.