Masses of tetraquarks with two heavy quarks in the relativistic quark model