Finite element method for a nonlocal Timoshenko beam model