Heat a large nonstick skillet over medium heat. Add oil, onion and garlic and cook for 2 minutes, stirring occasionally so garlic doesn't burn. Add tomato paste and cook 1 minute. Add tomatoes and puree, sugar, salt and red pepper flakes. Break up tomatoes with a wooden spoon. Cook, uncovered, over medium heat for 12 minutes, stirring occasionally.
While sauce is simmering, cook pasta following package directions, about 10 minutes. Drain, reserving 1/2 cup of the cooking water.
Tear basil into bite-size pieces and stir into sauce. Toss pasta with sauce, adding 1/4 cup of reserved cooking water if needed to thin out sauce.
To serve, spoon pasta into individual serving bowls and top each with a tablespoon of ricotta.