In a large pot of boiling water, cook pasta until al dente (tender but firm); drain. (If sauce isn't ready, rinse pasta under warm water for a few seconds to prevent sticking.)
Meanwhile, in a large heavy saucepan or Dutch oven, heat oil over high heat. Add onions, tomatoes and garlic; cook, stirring, for 2 to 3 minutes or until tomatoes are just heated through but still hold their shape.
Stir in rotini, ham (if using), parsley, basil and Parmesan. Reduce heat to medium; cook, stirring gently, for about 2 minutes or until heated through. Season with salt and pepper to taste.