Bring a large 1-gallon pot of salted water to a boil, and place the pasta in the pot. Cook for 5 minutes and then drain; pasta will be only partially cooked. As the pasta cooks, set a 14-inch saute pan over medium-high heat and add the olive oil. Once the oil is hot, add the onions to the pan and cook until lightly caramelized and wilted, about 3 to 4 minutes. Add the garlic to the pan and saute until fragrant, about 30 seconds. Add the red pepper flakes and saute briefly before adding the tomato sauce and tomato paste. Cook the sauce until reduced by about half, about 5 minutes. Add the shrimp to the pan and cook for 2 minutes. Add the partially cooked pasta to the pan along with 1 cup of the pasta cooking water and continue to cook the pasta in the sauce until al dente, about 3 to 4 minutes. Season the pasta with the salt and garnish with the parsley. Toss to combine and serve with grated Parmesan, if desired.