Dynamical control of one- and two-dimensional optical fibre scanning