Cook pasta according to package directions, drain and set aside. Reserve 1 cup of pasta cooking water.
Heat 1tbsp olive oil in a saute pan, add the onions, peppers, garlic cloves and almonds. Cook covered on medium flame until the veggies are tender and slightly getting browned around the edges. Turn off the heat and let the mixture cool a little. Then grind to a smooth paste adding enough water.
Return the pepper-almond paste to the pan along with tomato puree, dried basil (if using), red chili flakes (if using), salt and pepper. Simmer the mixture for 3~4 minutes. Add some pasta cooking water if the sauce looks too thick.
Add the cooked pasta to the sauce and mix well. Garnish with fresh basil leaves (if using) and serve hot.