If you are that worried about something, then you and your girlfriend can get STD tested. If all results are negative, then there is noting to worry about.
From what you have described, your problems arose from masturbating "without proper lubricant", so the irritation should heal eventually. Just be sure to use a lubricant when masturbating. However, if you have a girlfriend, my advice is to stop all masturbation and save your sexual energy for when you are with her.