Safe way to close gaps around copper pipes?
A metal escutcheon ring might be sufficient for your purpose. I would fill the hole with steel wool to stop the mice, then cover with silicone to prevent a draft. The steel wool might be unnecessary, as I don't think mice will gnaw though silicone. However, if the hole is large, the steel wool would make it easier to fill it with silicone without having it fall into the basement.

Don't use spray foam such as Great Stuff around heat sources: it will melt and produce toxic fumes.

BTW, the reason the holes are so big is probably because there used to be three-inch pipes there. Such pipes were used for steam systems and for pump-less hot-water systems where the water was circulated by gravity (convection).