So, the question was answered by Alexander Lytchak. I am writing down the answer for the sake of completeness.
Consider the fibration between the universal covers $F'\to\tilde{M}\to \tilde{N}$. $\tilde{M}$ is contractible and $\tilde{N}$ is simply connected, thus we can apply the Serre spectral sequence with integral coefficients, and from it we obtain that $F'$ and $\tilde{N}$ are contractible. In fact, if $H^*(F')$ has cohomological dimension $a$, and $H^*(\tilde{N})$ has cohomological dimension $b$, then $H^*(\tilde{M})$ would have cohomological dimension $a+b$ and this has to be $0$.
Then $N$ is acyclic, and from the exact sequence in homotopy so is $F$. Moreover we have and exact sequence
$$ 1\to\pi_1(F)\to \pi_1(M)\to \pi_1(N)\to 1$$
where $\pi_1(M)$ is a Bieberbach group, i.e. a torsion free group with a finite index normal abelian subgroup. As for $\pi_1(F)$, a subgroup of a Bieberbach group is again a Bieberbach group and therefore $F$ is homeomorphic to a flat manifold.
As for $N$, one can prove that there exists a normal abelian subgroup of $\pi_1(N)$ of finite index. Moreover, $\pi_1(N)$ is torsion free, since otherwise there would be a finite cyclic subgroup acting on the contractible manifold $\tilde{N}$ without fixed points. This is not possible, and therefore $\pi_1(N)$ is a Bieberbach group. Again, this implies that $N$ is a Bieberbach manifold.