The answer is maybe. In its plain form, pasta is unlikely to harm your dog, especially in moderation.
However, it is worth being careful, as some pets have wheat allergies or are sensitive to grains.
Onions and garlic are toxic to dogs, so pasta sauce can make your dog sick.