Bring a large pot of salted water to a boil. Add the spaghetti and cook according to package instructions until al dente. Reserve 1/2 cup of pasta water, then drain the spaghetti and set aside.
In a large skillet, heat the olive oil over medium heat. Add the minced garlic and red pepper flakes, sautéing for about 1 minute until fragrant.
Add the clams to the skillet and pour in the white wine. Cover the skillet and cook for about 5-7 minutes, or until the clams have opened. Discard any clams that remain closed.
Stir in the cooked spaghetti and reserved pasta water, tossing everything together to combine. Cook for an additional 2 minutes to heat through.
Remove from heat and stir in the chopped parsley. Season with salt and pepper to taste.
Serve immediately with lemon wedges on the side for squeezing over the pasta.