Suppose you have a pair of operators acting on a Hilbert space, and such that,
$$
\left[A,B\right]=iI
$$
Then it can be proven that these operators cannot be both bounded. At least one of them must be unbounded. This makes sense, because,
$$
\textrm{Tr}\left(AB-BA\right)=0
$$
$$
i\textrm{Tr}I=i\times\infty [???]
$$
But there are in principle many solutions where one of them is bounded, but the other is not. So unless you specify the spectra, there is no clear answer, at least to me.
But,
if both operators $A$ and $B$ have $\mathbb{R}$ as their respective spectra, then there is a rigorous theorem that guarantees that they are unitarily equivalent to a so-called Schrödinger pair:
- Multiplication by $x$
- $-i\frac{d}{dx}$
"Unitarily equivalent" meaning that there exists $U$ unitary, such that,
$$
A=UxU^{-1}
$$
$$
B=U\left(-i\frac{d}{dx}\right)U^{-1}
$$
Mind you: for the same $U$!!
References:
- A. Galindo, P. Pascual: Quantum Mechanics, Vol. I, p. 80
- C. R. Putnam: Commutation Properties of Hilbert Space Operators and Related Topics
In your case, I'm assuming $\mathcal{O}_{m}$ and $\mathcal{W}_{n}$ have as spectrum $\mathbb{R}$. If that's not the case, the question is much more involved.
From the theorem:
$$
x=UxU^{-1}
$$
$$
\mathcal{O}_{m}=U\left(-i\frac{d}{dx}\right)U^{-1}
$$
Now, from the 1st equation, we get that $U$ commutes with $x$, and must be the multiplicative operator,
$$
U=e^{if\left(x\right)}
$$
and, when fed into the second equation, we get,
$$
\mathcal{O}_{m}=U\left(-i\frac{d}{dx}\right)U^{-1}\Rightarrow\mathcal{O}_{m}=e^{if\left(x\right)}\left(-i\frac{d}{dx}\right)e^{-if\left(x\right)}
$$
Let's check that this is correct and this new operator unitarily equivalent to the canonical $p$ still constitutes a Schrödinger pair with $x$:
$$
\left[x,e^{if\left(x\right)}\left(-i\frac{d}{dx}\right)e^{-if\left(x\right)}\right]\varphi=-i\left[x,e^{if\left(x\right)}\left(-if'e^{-if\left(x\right)}+e^{-if\left(x\right)}\frac{d}{dx}\right)\right]\varphi=-i\left[x,\left(-if'+\frac{d}{dx}\right)\right]\varphi=
$$
$$
=-i\left[x,\left(-if'+\frac{d}{dx}\right)\right]\varphi=-i\left(-I\right)=iI
$$
where I have applied that,
$$
\left[x,f'\left(x\right)\right]=0
$$
So there's your answer. The proof for $\mathcal{W}_{m}$ is similar, but I think you get the gist of it.
Edit:
Taking into account the trivial transformation,
$$
\mathcal{O}_{m}\mapsto\mathcal{O}_{m}+a\left(x\right)
$$
and similarly for $\mathcal{W}_{m}$, we would have the most general freedom for $\mathcal{O}_{m}$ and $\mathcal{W}_{m}$ to be,
$$
\mathcal{O}_{m}=e^{if\left(x\right)}\left(-i\frac{d}{dx}\right)e^{-if\left(x\right)}+a\left(x\right)
$$
$$
\mathcal{W}_{m}=e^{ig\left(p\right)}\left(i\frac{d}{dp}\right)e^{-ig\left(p\right)}+b\left(p\right)
$$