its not an std if you have not had an oral sex or vaginal intercourse. It could be irritation from the friction... Use lubracants while masterbating and clean after masterbation everytime with soap and water...
This is probably a late reply but anyways, i have found out that this is a penis eczema and specific "hydrocortisone cream" should be applied on the area every morning and night (ask your local med shops/gp to purchase + make sure to get all needed info). And so far the spots are fading away, Good luck people :)
these could be normal bumps if you haven't had sex with any one then this isn't an STD. you may want to see a dermatologist if it is concerning to you