Masses of excited heavy baryons in the relativistic quark model