Correlation between the electronic structure, effective mass and thermoelectric properties of rare earth tellurides Ba2MYTe5 (M = Ga, In)