It very well could be constipation, or menstrual cycle-related pain. If it persists, and you don't have a bowel movement, you may want to get in to see a doctor. We are not doctors, so we can't diagnose you, we can only help you to advocate for your health.
I also urge you to read those articles I posted earlier just to assure yourself that you can't possibly get pregnant in the way you described. If you are super concerned about pregnancy, you may want to talk with your mom about this (if you can't talk with your mom, you or your boyfriend should get some condoms, and learn all about how to avoid getting pregnant).