Antibiotics are useful and powerful drugs. Unfortunately, they can have side-effects. Make sure your veterinarian is familiar with guinea pigs and will administer the "safer" antibiotics when they are required. Probiotics can be given orally at the same time as the antibiotic regiment. Live culture yogurt works well and many guinea pigs will eat it like a treat. There are also commercial lactobacillus supplements that can be used. While on antibiotics, avoid any sudden changes in your guinea pig's diet. Any changes can disrupt their normal gastrointestinal flora.
For more information, read Antibiotic Associated Enterotoxemia in Guinea Pigs