In a large saucepan melt margarine or butter. Add onions. Cover and cook over medium-low heat about 15 minutes or until onions are tender and golden, stirring occasionally. Sprinkle sugar over onions. Cook, uncovered, for 10 to 15 minutes more or until browned, stirring occasionally.
Meanwhile, lightly grease an 11- to 13-inch pizza pan. Unroll pizza dough and transfer to greased pan, pressing dough out with your hands. Build up edges slightly. Prick generously with a fork. Bake in a 425 degree F oven for 7 to 10 minutes or until lightly browned.
Spread cheese evenly over hot crust. Top with onions and walnut pieces. Bake for 10 to 12 minutes more or until heated through. Makes 12 appetizer servings.