You can eat pasta and lose weight - as long as you don't just eat any old pasta any old how...
Avoid fresh, refined, pre-cooked or overcooked pasta and the type of pasta that takes a long time to cook (it has a GI of 75). Instead, go for spaghetti or tagliatelle: the way they're made reduces their GI index to 40. Otherwise, wholewheat pasta has a GI of 50. Be careful how you cook them: go al dente and don't add creamy, buttery sauces or grated cheese!
Different types of rice have very different GI indexes according to where they're from, how they're cultivated and how they're cooked. Ordinary white rice has a GI of 70 to 90 and should be avoided like the plague! Go for basmati (50) or wild rice (35).