Heating and Acceleration of Protons and Minor Ions by Fast Shocks in the Solar Corona