Bring a large pot of salted water to a boil and cook the pasta according to the package directions until al dente.
While the pasta cooks, heat olive oil in a skillet over medium heat. Add the garlic and cook for about 30 seconds, until fragrant.
Pour in the diced tomatoes, basil, red pepper flakes, salt, and pepper. Simmer for 5 to 7 minutes, stirring occasionally, while the pasta finishes cooking.
Drain the pasta and toss it directly into the skillet with the sauce. Top with Parmesan cheese if desired and serve immediately.