Drain sauce from tamales; remove wrappers (discard sauce and wrappers).
Drain corn in a wire strainer, pressing lightly to remove excess moisture.
Place tamales in a bowl; break apart and mash with a fork.
Add corn, tomato sauce, olives if used, and beaten eggs.
Mix thoroughly and add salt and pepper to taste.
Pour into a buttered 9-inch-square baking pan or 9-inch pie pan, sprinkle with the cheese, and bake in a 350° oven for about 1 hour, or until the center of the pie is firm and the top golden brown.