Well, for all $n\geq 0$, $F_n$ is the nearest integer to $\frac{1}{\sqrt 5}\left(\frac{1+\sqrt{5}}2\right)^n$. So if you want to find the largest $n$ such that $F_n<M$, you can compute:
$$n \approx \frac{\log (M\sqrt{5})}{\log \frac{1+\sqrt 5}2}$$
The size of $M$ and how close $M$ is to an $F_n$ affects how closely you need to approximate these various real numbers. This feels $O(1)$ for reasonable values of $M$. For example, when $M=1000000$, you get $n=30$, and $F_{30}=832040$.
The matrix technique I showed in the prior problem gives you an approach that lets you find $n$ and also find $F_n$ fairly quickly.
Basically, given the $A$ from my answer before, compute:
$$A, A^2, A^4, \dots, A^{2^k},\dots$$
by repeated squaring until you "get too far." So $F_{2^{k-1}}<M\leq F_{2^{k}}$. Now use a binary search for $2^{k-1}\leq n < 2^k$. You can do that quickly because you already computed $A^{2^i}$ for $i=0\dots,k-1$.
I'm not sure about the complexity of this process, but it is certainly not much worse than $O(\log M)$. It's hard to do better than that since you are adding and multiplying numbers with up to $\log M$ bits. You can probably find $n$ faster if you don't also need to find $F_n$.
Now, if you want the largest $F_{3k+2}<M$, you might have to take the resulting $A^n$ and multiply it by $A^{-1}$ or $A^{-2}$ to get the appropriate maximum in that case.