Sure, why not? Just do a u-sub. Let ##u = wx## then you have ##e^{-iu} = \cos u - i\sin(u)##. Also, remember that cos is an even function, so you can drop the negative inside your argument!
If w is supposed to be a fixed complex number, you might prefer to rewrite the expression a bit before applying Euler's formula to it. But the statement is certainly true, nothing about Euler's formula requires x to be a real number to begin with.