Bring a large pot of salted water up to a boil. Cook your spaghetti according to the package instructions. Reserve about 1 cup of pasta water, and drain the spaghetti. Set aside.
In a large skillet, combine olive oil, onion, and garlic. Place over medium heat and cook for about 2 to 3 minutes, or until the onion turns translucent and softens.
Add the salt, oregano, tomato paste, and diced tomatoes, along with half a cup of the reserved pasta water. Bring the mixture up to a boil, and reduce heat to a low simmer. Simmer the sauce for about 5 to 10 minutes, or until the tomatoes have softened fully.
Add the cooked pasta to the sauce, along with the spinach. Toss to coat the noodles in the sauce. If the sauce seems dry, add more pasta water as needed. Continue cooking the spaghetti over low heat until the spinach is wilted. (Optional) Top the spaghetti with grated parmesan before serving.