Quaternionic solutions for the relativistic Kepler problem with magnetic charges