In a large saucepan, heat the olive oil over medium heat. Add the onion and sauté for 5 minutes until softened. Add the garlic and sauté for 2 more minutes, until you can really smell the garlic, and it starts to turn golden. Add the tomatoes, tomato paste, salt and pepper, oregano, basil, and red pepper flakes if using (you can also add those to portions of the sauce at the end for those who like it hot). Bring to a simmer, lower the heat to medium-low, and simmer gently for about 20 minutes (it can simmer for much longer if you want; it will just get even richer and more concentrated). Taste and adjust the seasonings as needed.
Meanwhile, bring a large pot of water to a boil over high heat, add a couple of tablespoons of salt, and allow the water to return to a boil. Cook the pasta according to the package directions.
Drain the pasta, return it to the pot, and pour about half the sauce over, more or less according to how saucy you like it, stirring to combine. Transfer to a serving bowl or serve into individual bowls, topping each portion with Parmesan, fresh basil, and red pepper flakes as desired (or pass the toppings in small bowls at the table).
Notes
This sauce will last well-sealed in the refrigerator for 5 days, and can be frozen for up to 9 months.