Irregular periods

I have been having irregular periods the last 2 months and I have been having unprotected sex. Usually they last 8 days but the past 2 months they only last 4 and mostly just spot during the 4 days.. and I'm really concerned what it would be that would make me have irregular periods.