Do not give a guinea pig, or any other animal, any kind of medication, particularly laxative, without specific instruction from a veterinarian. A laxative could easily kill a guinea pig.
First and foremost, WATER, always available. Fresh greens, fruits, veggies, and hay. There is no reason for a guinea pig to need a laxative if you are feeding them correctly.