It may very well be an STD, however, there is no way to be 100% positive unless you go to the doctor to get checked and tested. You should go ASAP, especially if you are currently having sex and especially because the bumps are painful.
It sounds like it could be an STD. There are a variety of STDs that can cause bumps. Herpes can produce bumps that appear as a cluster of small blisters that evolve into painful ulcers. You should go to the doctor and get a checked out. Use condoms when having sex. If you decide not too - both of you should get HIV test and any other testing done together. Don't take somebody's word for it when they say they are clean - you never know. Goodluck