The -rescan flag makes the wallet rescan the blockchain for any missed transactions.. I am not entirely sure it will remove transactions found in wallet.dat but not in the blockchain, but you can always try..
Another option is to dump your private keys to a file, shut down the wallet, backup wallet.dat to somewhere safe, then delete the original wallet.dat, start the wallet software and import the private keys one by one.. When you import a private key, the blockchain is scanned for transactions.