Entangling the motion of two optically trapped objects via time-modulated driving fields