You didn't specify the year of the truck, but you say a locksmith cut and PROGRAMMED a new key. I am assuming the truck is 1999+ and ran fine prior to losing the key? If the truck is 1999+ it means it has PATS (Passive Anti Theft System). When a key is NOT programmed correctly, the engine will crank, but won't start. I don't know of any instance where there is an exception to this rule. The flashing theft light gives me reason to think there is something wrong with the key programming. But the fact it will run up to 25 mph makes me think there is something else going on here. Have you put a scanner on it yet? Does it sound "funny" when you accelerate? I worked on a car back in the mid 1970's that wouldn't go over 30 mph or so. Turned out that the header "Y" pipe had collapsed internally (twin wall pipe). So this instance could possibly be a plugged cat or muffler. I would have someone try to rev the RPMs up to about 2000 and see if you are getting the expected exhaust out the back. If not, drop the exhaust off at the manifolds and see if that makes a difference. Without more info on the vehicle, it is hard to try to pin it down.