You can get Miralax OTC at a drug store. It's in a purple bottle and powder form. Just make sure it's the ORIGINAL formula and not any other. It is a stool softener.
Others have mentioned Lactulose, I have no experience on it though. Good luck.
From what I have read, Miralax is much better than Lactulose, especially for long term use. I would recommend getting miralax. Here's the thread discussing the two:
Sven used to be treated with Lactulose for his constipation problems, and it DID work in the beginning, but after awhile it began to lose it's effectiveness, and that's when I began to investigate other alternatives. Our Vet didn't know anything about Miralax until I brought it up. She then investigated it and said it as AOK to use, even though Sven was a CRF kitty.
I much prefer to Miralax because 1) it can be used daily, 1) it's much cheaper, and 3) it continues to work!
But don't be disappointed about the Lactulose. For first time issues, it will probably do the job!
Lactulose is a thick syrupy sweet solution and Miralax is a tasteless, odorless powder, quite frankly its surprising to me that cats will accept the Lactulose.
(This is from a nurses point of view)