Heat 2 tablespoons of the olive oil in a large pan over medium heat. Add the onions and cook for 4-5 minutes or until softened. Add the garlic and cook for 1 more minute.
Stir in the red pepper flakes (optional), then add the pureed tomatoes. Season with salt and pepper to taste.
Bring to a simmer and cook for 20 minutes or until sauce has just started to thicken. Stir in the butter, then remove the sauce from the heat.
While the sauce is simmering, cook the spaghetti in a large pot of salted water according to package directions.
Drain the pasta, reserving 3/4 cup of the pasta cooking liquid.
Heat the remaining tablespoon of olive oil in a large pan over high heat. Season the scallops with salt and pepper, then add them to the pan.
Cook the scallops for 1-2 minutes per side or until browned and opaque.
Remove the scallops from the pan. Season the shrimp with salt and pepper and add them to the pan. Cook for 3-4 minutes or until pink and opaque.
Remove the shrimp from the pan. Place the clams and mussels in the pan, along with the reserved pasta water. Bring to a simmer.
Cover and cook for 4-6 minutes or until clams and mussels have opened. Discard any shells that did not open.
Add the shrimp and scallops back to the pan along with the tomato sauce and spaghetti. Toss to coat everything with the sauce.
Sprinkle with parsley, then serve.