Garlic and onions are safe for goats. They are toxic to dogs and cats, however. They can also eat tomatoes, and limited amounts of bread (too much non-structural carbohydrates can lead to a dangerous condition called bloat).
There's some debate about whether cheese would be an issue. Some people say dairy is bad for goats, others say it's fine. I think it's more likely the latter.
If the pizza had meat on it it would probably be a bad idea. A goat's digestive tract isn't really set up to handle meat.