How do I dispose of papers with the names of Allah SWT, the prophets as or Imams as. Can I just cross the names out and throw the paper away?

Yes, you may cross out the names and then dispose of the papers. Or you may cast the papers in a body of water such as a river or lake.
But burning the papers or shredding them is considered desecrating the names, so it would be prohibited.