Cook the pasta according to package instructions in a large pot of salted boiling water until al dente. Reserve 1/2 cup of pasta water, then drain the pasta.
In a large skillet, heat the olive oil over medium heat. Add the minced garlic and sauté for about 1 minute, until fragrant but not browned.
Add the drained diced tomatoes, oregano, and red pepper flakes (if using) to the skillet. Cook for about 5 minutes, stirring occasionally, until heated through.
Reduce the heat to low and stir in the ricotta cheese and half of the Parmesan cheese. Mix until well combined and creamy. If the sauce is too thick, add some reserved pasta water until you reach your desired consistency.
Add the cooked pasta to the skillet and toss to coat the pasta with the sauce. Season with salt and pepper to taste.
Serve immediately, garnished with the remaining Parmesan cheese and fresh basil leaves.