Can you control a motor's general speed by oscillating from 3.3V to 0V?
Yes, you actually ``invented'' the most used drive method in the world for small motors (and many bigger ones too). In fact most microcontroller have dedicated peripherals for that, the PWM generators (more or less advanced).
The Pi processor is no exception (altough is more a computing processor, so it's not really advanced).
It's so common someone else already did it. Look here:
https://www.codecubix.eu/linux/hardware-pwm-with-raspberry-pi-zero/
Search for &quot;pwm motor control&quot; for a bootload of information on the technique.
EDIT: yes, JRE said a really important thing: you need some motor driver board, the Pi has no drive power and you'll risk burning the board if you attach directly a motor to it!