Acceleration of oxygen ions in the dynamic magnetotail