Your goal is very achievable , but with considerable amount of money (that is : you can not buy any old cheap(relatively) system and throw it on a bike and aspect it to do whatever you need, ie to go for 40 miles with average speed of around 28 mph and significant time of top speed of 35 mph). Level ground is quite good thing but (and this is from top of my head) you're looking at at least 500$ worth of batteries(or more) and around 250 $ + for motor and some more for controller (can't really tell the price - it has been a while since I've looked at prices). Also , the good thing is that you don't need to buy a new motor and controller , because those things are working or not (the only thing that wears out on a BLDC motor are bearings). We've been around this subject quite a few times on this forum and I'll try to recapitulate in short: 1500 W is enough for your designated top speed , provided that you are not heavier than 200-220 pounds and that you have proper gearing on your bike. You are looking at brushless DC motor , because those things are more efficient than brushed motors (which are much cheaper , but with less efficiency - therefore more batteries). Led batteries are , probably , not an option for you because of few reasons: their weight and bulkiness (in amount that you'll need for your desired range and definitely NOT at those speeds) are at the limit of what you can mount physically on a bike and bear in mind that you'll also need about 30% more capacity than if you use Lithium based batts. The reason for this is that led batteries can be discharged only 80% of their capacity (safely) and more probably 70% within limited number of times (very limited - around 200-250 times). They are more temperature sensitive , so aspect some reduction in performance during cold days. The price for that kind of battery pack is 2 to 3 times less than for similar Lithium based pack , but useful duration of those is 4-5 times less(at least). To conclude about the energy source (batteries) - you are probably stuck with Lithium technology and that costs (again , those are practically incomparable in terms of reliability , usefulness , low weight and working time , if handled properly). If something (God forbid) happens (brake down) on the road , it is much easier to pedal or push the bike with Lithium than with 50 pounds of led. You would need at least 20 AH pack , if not some more , depending on chosen Voltage for your system and some calculations of juice consumption.
As for motor , I'm strong advocate of BLDC motors for use on the bikes and when you research some more about it , you'll find that prices aren't so different between 1000-1500-2000 W (in same category of motors) so you can go for stronger one and set the energy consumption on your controller and throttle (accelerator). Advice , look on E-bay and Chinese manufacturers (if you have some doubts about Chinese stuff , let me tell you - most of the motors ARE made in China , never mind the label of the American/German/French or what have you company). Brushed motors are OK , but not in your case (significant range at significant speeds). You'll also need to pay attention on torque of the motor (manufacturer's technical sheets) , because low torque motors aren't god also , in your case (they can be ok ,but with complicated/expensive gearing and we try to go as simple as possible).
Controller is also important for reliability , in sense that it has to be one that you can adjust in number of parameters (Amps , duty cycle , monitoring state of battery pack , desirable monitoring of temperature of the motor...) , but you can make do with the cheap one , providing that it has some sort of protection against electrical surges and overheating (if it is cheap enough , you can buy two - one for spare), but I'm not advising that.
At the end , you will probably want to research some more about the subject and solutions and a good place would be a Endless Sphere forum. You can find there all sorts of information and practical advise (where and what to buy also) and lots of tips & tricks about maintenance , use , repairing and assembling your bike. At some point (when you have all the needed information) you'll need to wage carefully pro's and con's of having electric bike , opposed to having petrol powered one in terms of money , because you don't need el. bike for joy ride around the neighborhood or as a toy (as far as I gathered from your posts) and which of those two solutions is more paying off for you.
hope this helps
regards
P.S. sorry for the bad English - it isn't my language