LM317 a linear component. In this case, that means any voltage that it drops is dropped as a result of resistance. Drop more voltage at the same current? Dissipate more heat. Allow more current at the same voltage? Dissipate more heat. In this case, the LM317 doesn't gain you anything over using a plain old potentiometer to control the motor speed. Both will dissipate the extra power as heat.
For PWM, you will use (usually) a 555 chip as a timer. That part of the circuit will include a potentiometer to vary the 555's output (the duty cycle or percent time the output is on). The circuit may have a maximum or minimum output, like 95% or 5%. Then you will use that output signal to rapidly switch the motor on or off, usually by switching its power with a MOSFET or BJT (Darlington unless the motor is tiny). Since the power is mostly on or off with very little time in transition (for transition is where the voltage is dissipated in the transistor as heat), the circuit is more efficient. Will the motor like its power being pulsed like that? I'm not sure, but you can post details of the motor and someone more educated than me will tell you.
To choose between a MOSFET and a BJT, look at how much power will be dissipated by each. The MOSFET will present a resistance when it's on (you can see this as a graph in the data sheet), and the BJT will present an almost constant voltage drop.