if you had this before you started having sex its unlikely they are an std. They could be wee white heads, cysts, skin tags or polyps. In any case you should see a doctor/gynaecologist and get them checked out and then you will know for sure, and also would pay for you to have an idea of what is normal, in case anything else should come up.
PS masturbation is unlikely to have caused or affected them.
:)
This is embarassing but i used to masurbate often. would this have anything to do with this?