The condition tells us that for all $n$, the function $f_n(x)=f\left(x+\frac 1n\right)-f(x)$ is increasing.
Take any two reals $x<y$.
Assume first that $y-x\in\mathbb R\setminus\mathbb Q$. In this situation, because of the density of the set $\{n(y-x)\}$ in $(0,1)$, we can find a sequence $n_k\to\infty$ s.t. $\frac{y-x-\frac {m_k}{n_k}}{x+\frac{m_k+1}{n_k}-y}\to 0$ as $k\to\infty$, where $m_k$ is the largest positive integer for which $x+\frac{m_k}{n_k}<y$. A simple computation will then show that $\frac{f\left(x+\frac{m_k+1}{n_k}\right)-f\left(x+\frac{m_k}{n_k}\right)}{\frac 1{n_k}}\to f'(y)\ (*)$ as $k\to\infty$. On the other hand, $\frac{f\left(x+\frac 1{n_k}\right)-f(x)}{\frac 1{n_k}}\to f'(x)\ (**)$. From $(*),(**)$, and the fact that $f_{n_k}$ is increasing for all $k$, we find that $f'(x)\le f'(y)$.
If $y-x\in\mathbb Q$, it's even easier to show that $f'(x)\le f'(y)$: we just take $n_k\to\infty$ s.t. the denominator of $y-x$ divides all $n_k$.
We can thus show that $f'$ is increasing, and, since it has the intermediate value property, it must be continuous.