Theoretical study of the low-lying electronic states of the BaK molecule