Production of dimuons from high-energy polarized proton-proton collisions