Heat the olive oil over medium-high heat in a heavy saucepan. Saute the onions in it for 5 to 10 minutes or until transparent and just starting to brown.
Using a knife, cut the tomatoes coarsely inside their cans. Drain off the juice and reserve.
Add the tomatoes to the saucepan, along with a dozen basil leaves, very coarsely chopped. Season with salt and red pepper flakes to taste. Let the sauce come to a boil, then lower heat, simmer for 45 minutes. It should have a medium-thick consistency; keep adding back some of the reserved tomato liquid to maintain the correct consistency.
While the sauce is cooking, boil the spaghetti in a large amount of salted water.
When ready to serve, add another dozen very coarsely chopped basil leaves to the sauce, and whisk in the butter. Drain the cooked spaghetti in a colander, draining all water from the pasta cooking pot, then return the spaghetti to the pot. Add about 2/3 of the sauce to it, or just enough to lightly coat the spaghetti with sauce. Stir well for one minute over medium heat. Divide spaghetti among eight bowls, placing a few small basil leaves on each spaghetti bowl. Top each with a few tablespoons of sauce. Serve immediately. Pass freshly grated Parmigiano-Reggiano if desired.