These are indeed probably inflamed follicles rather than an STD. These can come from shaving, but they can also come from nothing in particular. There is a chance that they could be molluscum warts, which are mostly not sexually-transmitted. I advise you to leave the lesions alone and show them to a doctor for definitive diagnosis. Meantime, apply on OTC antibiotic like bacitracin daily.
Take care.
Dr. Rockoff