pregnant?

Could I be pregnant if I had sex one day before I got my period? Or what does that mean ? Because I still get cramps like if I was on my period.