Pasta is not inherently bad. Very few things are inherently bad, so it helps to move away from the idea of bad food vs. good food.
Can you eat a single serving of pasta? Does it fit within your calorie range (or whatever plan you're using to diet)? If so, then there's nothing wrong with eating pasta.
If you wanted to make it a little healthier, then you could cook whole grain pasta instead of plain pasta.
.