Optimal transformations of the integration variables in computation of singular integrals in BEM