Add the grated onions and garlic, and sauté, stirring frequently, until fragrant and beginning to melt (about 4 minutes). Add the salt, pepper, basil and sugar, and stir to combine. Add the oregano, pressing it between your finger and palm to release the oils, and stir to combine. Add the tomato paste and tomato puree, and whisk to combine well. Cook until heated through and just beginning to bubble. Add the (optional) bacon, and stir to combine. Add more salt and/or pepper to taste. Serve hot.