I have never read anywhere about feeding ham to a hamster.I have however thru my research read where fish or chicken(boiled or baked) are okay in moderation.
One thing to remember is giving too many treats are not good for your hamsters as with any pet.A few other treats I have found while searching the net include these
Acorns
Almonds (shelled)
Beechnuts
Biscuits
Boiled Potatoes
Brazil Nuts
Bread (fresh or stale)
Breakfast Cereals
Cake - but not chocolate cake
Cashew Nuts
Chicken (cooked)
Cheese
Coconuts
Crickets
Currents
Dog Biscuits
Egg (scrambled or boiled)
Fish (cooked)
Hazel Nuts
Mealworms
Meat (cooked)
Nuts
Pecan Nuts
Peanuts (shelled or unshelled)
Pistachio Nuts
Prunes
Raisins
Sweet Chestnuts
Sultanas
Toast
Walnuts
source