It sures sounds like the beginning of peri-menopause to me. Some women start this as early as 35. I have had it for years, it is not fun. I would sure see a gynecologist and have some tests run to rule out anything more serious, and also ask for some hormonal blood tests; but, as I said, the fluctuating hormones can cause all kinds of trouble, and our periods are the first place it can hit.
It can be the beginning of pre-menopause or it's a serious female reproductive organ problems. Before menopause, the periods can be irrigular and spotty. My mom had similar symptoms then was diagnosed with cervical cancer at age 46. She went under surgery and had her reproductive organ removed. She is still very healthy at age 71 now. I would take it seriously to have a doctor exam it. Hope it's just getting into pre-menopause period.
It can be caused by a lot of things from hormones to cancer. You will need to see your doctor to figure it out.