A study of emissivities and transition probabilities of diatomic molecules in optically thick hot gases with applications to the B1∑−X1∑transition of BeO