Yes, guinea pigs can eat vegetables and fruits, but only in moderation as part of a balanced diet.
Vegetables
Good choices: bell peppers, carrots, broccoli, spinach, kale, cilantro, parsley, romaine lettuce, squash, zucchini. Limit celery, iceberg lettuce, and high-oxalate vegetables.
Fruits
Good choices: strawberries, blueberries, raspberries, bananas (small amounts), apples (no seeds), melon. Limit citrus, grapes, and avoid avocado.
Important Tips
Introduce new foods gradually, wash everything, offer variety, and make hay the staple of their diet. Consult your veterinarian for specific advice.