In a large pot, cook the lentils in water according to the package instructions (about 20 minutes for dried lentils). Once tender, drain and set aside.
Heat 1 tablespoon of olive oil in a large pot over medium heat. Add the chopped onion, garlic, carrots, and celery. Sauté for 5-7 minutes, until the vegetables are softened and the onions are translucent.
Stir in the crushed tomatoes, tomato paste, and red wine (if using). Let it cook for 2-3 minutes to allow the wine to reduce slightly.
Add the cooked lentils, vegetable broth, basil, and oregano to the pot. Stir to combine and bring to a simmer. Let the sauce cook for 20 minutes, allowing the flavors to meld and the sauce to thicken. Season with salt and pepper to taste.
While the sauce is simmering, toast the chopped walnuts in a dry pan over medium heat for 3-4 minutes until fragrant and slightly golden.
While the sauce simmers, cook your pasta according to the package instructions. Drain and set aside.
Once the sauce has thickened, stir in the toasted walnuts for extra texture and flavor. Serve the sauce over the cooked pasta and garnish with fresh parsley or basil.