Weak solutions of the problem of torsion of micropolar elastic beams