Is it safe to remove database tables of removed modules? I have disabled the 'mollom' module a long time ago but the tables ('mollom' and 'mollom_form') still exit in database and it takes time to repair them when I try to optimize the database. So I am wondering whether it is safe to remove these tables altogether?
Disabling a module doesn't mean uninstalling it. To uninstall a module, once you disabled it, you need to go to admin/build/modules/uninstall (Drupal 6), or admin/modules/uninstall (Drupal 7, and Drupal 8), select one of the module listed, and click on the button to uninstall them. 

Since Drupal 7, every database table declared with hook_schema() is automatically deleted from Drupal. Modules still need to delete any Drupal variables they define, though.
Since Drupal 8, a module can just be uninstalled. You cannot anymore first disable it, and then uninstall; you just go to admin/modules/uninstall and uninstall the modules you need. If the module cannot be uninstalled for any reason, Drupal will show in that page the reason why it cannot be uninstalled.