is it possible that I'm pregnant ?

Hello, So recently my ex bf and I reconnected. Im not on birth control, 2 weeks ago we had sex but he didn't cum inside me, there was no protection. A little less than a week ago we had sex twice he came on me once but not inside me. My cramps have been wicked bad, worse than Ive ever experienced. Im super nauseous throughout the day on and off. however that could just be my allergies. I got my period the very next day after the less than a week ago incident. I happened to go to the doctors office about my allergies and my cramping came up to topic and my doctor asked if there was a chance I was pregnant but you see, mathematically it didn't make sense seeing as I shouldn't have been ovulating during any of the situations we were together and he never actually came inside me. There was never any protection involved. (Stupid I know). I told the doctor there was no chance bc my mom was standing right there, but could i be pregnant? And if so what's the earliest pregnancy test I can take and what brand.