If a power specifically calls for a melee basic attack, the player may only make a melee basic attack
Basic Attack
When a power or other effect allows a creature to make a basic attack, the creature can make either a melee basic attack or a ranged basic attack. If the power or other effect specifically calls for a melee basic attack or a ranged basic attack, the creature must use that type.
Published in Player's Handbook, page(s) 287, Rules Compendium, page(s) 238. D&D Insider Compendium
If the player was wielding a longbow, they would not be able to use it for a melee basic attack.
A melee basic attack is defined as using a melee weapon, not a ranged weapon. How far a weapon can attack (range) has no bearing on whether or not the weapon is a melee weapon or a ranged weapon, think about reach melee weapons. The longbow is only a ranged weapon. Some weapons are both melee and ranged (particularly thrown weapons), but this is not the case for your player.
The player could have made an MBA, but not a great one
In the situation you describe if the player wished to take advantage of the MBA, the could make an improvised weapon attack using their bow...
Weapon Prof. Damage Range Weight Prop. Group
One-handed — 1d4 — 5 lb. or less — None or unarmed
Two-handed — 1d8 — 6 lb. or more — —
Which version of the attack you would be making is DM's discretion.
In 4e powers do exactly what they say, no more, less
If a player is granted an MBA by a power, he may only use that to make an MBA, the player cannot take alternate actions. Likewise unless a power said, save this attack for later or something like that you can't save up an MBA to use when you want to/are able to.
The errata for the PHB includes this fix for reach weapons:
This property also determines your reach for opportunity attacks with a reach weapon.
So when a creature moves from 5 feet away to 10 feet away, you can make an opportunity attack with your dagger or cast a spell using War Caster. When a creature moves from 10 feet to 15, you can only make your opportunity attack with the whip.
Best Answer
There appear to be a few feats along these lines, but none are as straightforward as "You get to use a ranged weapon without provoking an opportunity attack."
The closest may be these three, which require the Harrowing Swarm Student feat and are from Martial Power 2 p115-116, and are for Warlords, Rangers and Rogues, respectively:
The remainder I could find get fairly specific as to the circumstances under which you can avoid provoking OAs:
Opportunistic Archer, a paragon tier feat for an 11th level elf fighter, from Martial Power p144: "When you can make a melee basic attack against a target because of Combat Challenge, you can instead make a ranged basic attack with a bow against the target. The ranged basic attack does not provoke opportunity attacks."
Sling Expertise from Heroes of the Fallen Lands p317 and Heroes of the Forgotten Kingdoms p318 allows you to make a sling attack without provoking OAs (as well as increasing your attack stat).
Combat Casting for the Swordmage, from Arcane Power p124, has this effect: "When you use a melee swordmage attack power and hit an enemy, your ranged and area swordmage attack powers don’t provoke opportunity attacks until the end of your next turn."
Defensive Throw for the Ranger, from Martial Power 2 p132, has a similar effect: "Whenever you make a melee attack, your ranged attacks with thrown weapons don’t provoke opportunity attacks until the start of your next turn."