With mirrors obviously
I suppose you could argue that there is some sort of feedback from the beam that transports material back to the ship. Or possibly an integrated tractor beam :S
What would your solution be? Landing on the asteroid perhaps? having to physically leave the ship to set up equipment would be cool.
I already offered a viable mechanic.
The player scans an area for materials he wants.
He has a few expensive mining drones on board, which he then can tell what they should prioritize while gathering the ore. The drones do the mining and will put the ore in transport containers. The presence of the player is not required during the mining phase itself. He will need to return to the mining site to fetch the filled containers and transport them to sell them.
This could be one of the methods, but I think it is the most viable, especially in deep space or hostile planetary environments, moons etc.
This method would not require the player to mine every tonne of ore by hand. This would become boring and tiresome very soon.
Also the mechanic of scanning an area for useful ore could be an interesting and even exiting mechanic, because who knows what you might find when searching for worthwhile ores. There could be gems, gold etc. The scanning process would be the most exiting and interesting for the player, not the mining itself. That is where the drones come in.