If the vet says it's just gunk, not mites or an infection, you can use either cotton balls or "kitty ear wipes". I use these on Bella's ears. She's prone to a lot of gunk in her ears, so we do a regular cleaning every 10 days or so. Stanley's ears tend to be cleaner, so I use the wipes on him monthly.
Recently the gunk increased dramatically in Bella's ears, so the vet prescribed ear drops in addition to our regular ear cleaning.