Sure you can. There've been a number of discussions and articles here and elsewhere about lacing rims and hubs with different numbers of spoke holes. Might get complicated, but you can do it.markz said:48H is much stronger then 36H might be an option for mid drive setup, just cant lace no motor into the rim later on.
At least some of the spoke calculators may even automatically get you the right spoke lengths for this.
If you wanna use the "correct" number of spokes for the rim, but the hub doesn't have the right holes, you can make bolt-on rings for teh flanges that have the rim's number of holes on the outer circumference, and the inner one matches the hub's number of holes.
Probably other ways, too.