Cook the bow tie pasta according to package instructions in a large pot of salted boiling water. Drain and set aside.
In a large skillet, heat the olive oil over medium heat. Add the chopped onion and sauté for about 3-4 minutes until softened.
Add the minced garlic and cook for an additional 1 minute until fragrant.
Remove the casing from the Italian sausage and crumble it into the skillet. Cook until browned and cooked through, about 5-7 minutes.
Stir in the diced tomatoes (with their juice), dried basil, dried oregano, and red pepper flakes (if using). Season with salt and pepper to taste. Simmer for 5-10 minutes to allow the flavors to meld.
Add the cooked bow tie pasta to the skillet and toss to combine with the sausage mixture.
Serve hot, topped with grated Parmesan cheese and fresh basil leaves if desired.