Raidthewood, are you new to riding bikes?
You seem keen on the idea of riding at 27-40mph. 40 is awfully fast on a bike; any type of bike. Adding a motor will help you get up to speed, sure, but it won't help with braking or handling.
Rather than thinking of an electric motor as something that will help you go fast, you should think of them as something that makes hills easier and enables you to ride further, easier.