Unfortunately there is a flaw in this solution. It is in the statement "To see that $F$ is also continuous when $t=1$, it suffices to prove that for any neighborhood $U$ of the origin $O$ in $X$, $f^{−1}(U)$ contains all but finitely many intervals of $(a_i,b_i)$."
The problem is that if the homotopies are chosen as described above, but otherwise arbitrary, continuity can fail. Example: suppose that the $(a_i,b_i)$ cluster at some point $s_0$. Suppose the initial loop is trivial. Suppose that the homotopy "shrinking" the small loop on $[a_i,b_i]$ sweeps over the sphere $S_1$ before collapsing back down to $O$. (Perverse, but not excluded by the description. N.B.: always the same sphere.) Then for $t$ arbitrarily close to 1 and points $s$ arbitrarily close to $s_0$, we have $F(s,t)$ always at least some fixed distance (say 1/2) from $O$.
To fix this, we need to exert some control on the homotopies. If the small loop on $(a_i,b_i)$ does not have the ''opposite pole'' (the point furthest from $O$) in its range, then shrink the loop by sliding along the meridians from the opposite pole to $O$. This creates a distance decreasing property for these homotopies. If the opposite pole is in the range, then any homotopy will work.
Now we use the continuity of the initial loop. It follows, as in the previous poster's argument, that the $F(\cdot,t_k)$ is continuous for $t_k=1-(1/k)$. Also for $t_k$ sufficiently close to 1, $F(\cdot,t_k)$ is as close as you like to $O$. We now have a dichotomy for loops yet to be shrunk. Either the support of the loop is in a ''small'' sphere, or else the opposite pole is not in the range. Either way, the homotopies will keep us close to $O$.