No in principle the GPIO's are simple on/off ports, to control motor
speed something more complex is needed.
It often done with "pulse with modulation" (PWM) which means that a constant stream of logic level pulses is created, where the width of the pulses can be varied, that is the length of the time the pulse is "high" can be varied, often when the high time is increased the low time is decreased just as much, so that the frequency of the pulse stream stays the same.
PWM is often used to control the angle of a servo motor, but it can also be used to control a motor driver/controller (IC). And it's quite easy to convert a PWM signal into an analog signal (that can control how much current is fed to a motor)
The some of the PI's GPIO pins can do more than just switching on or off, for example some can send/receive serial data, to/from a RS232 driver. One of the GPIO's has extra hardware, so that it can act like a dedicated PWM generator, but just one GPIO pin knows how to do this trick.
However, creating a PWM signal can also be done in software, and someone already wrote software to create not one, but many PWM signals!