Arduino PWM to analog: RC filter vs DAC?
If your motor driver (AKA electronic speed control) is of the type used in radio controlled models, the expected speed control signal isn't just a voltage level. It listens for the RC servo "protocol": A constant frequency (usually 50 Hz) square wave with a high time between 1 ms (motor stopped on an aircraft, full reverse on car/boat ESCs) and 2 ms (full forward). While this is often called PWM, you can't just feed any PWM signal to it and expect it to work.

  

A servo control signal with the correct timing is easily generated by an arduino with the included servo library.



If the motor driver does actually expect a signal in the form of a voltage level (like some E-bike motor drivers, for example), you need an actual digital to analog converter (DAC) to set the speed.  


As you already suggested, the easiest way is probably to use the PWM output library function analogWrite() and low pass filter the waveform. This is an actual, rudimentary form of a digital-to-analog converter, and should be more than good enough for your application. 
You can use a dedicated DAC chip. While I have never seen a DAC chip which takes a PWM input (A PWM signal is actually not digital even though it only has two voltage levels, as pulse width is a continous analog property), you can buy DACs with either a serial (e.g. I2C or SPI) or a parallel(one input pin dedicated for every bit) interface.