Yes you can use a mosfet, i have been doing that for a while now to control dc motors as a relay uses too much power and has no real control. All you need is a N channel mosfet and two resistors and possibly a reflecting diode if you're running an inductive load, fyi those few parts cost nothing, less than a average relay. you can use pwm or just a digital output to set a mean voltage or fixed on and off. And to that i can make the pcb same size or smaller using through holes components.