Do the "top two gears" mean the largest cogs, which are the lowest gears, or the smallest cogs, which are the highest gear ratios? If the latter, it's probably excess friction in the cable housing, usually in the back loop at the derailleur. Remove the cable from the derailleur and see if it'll shift by itself. If so, work on the cable.