While I don't know if the state department had a travel ban in place for Pakistan in 1981, or any part of it, it would not be completely incompatible with us supplying weapons to them.
A country can be very dangerous, and still an allie or an enemy of an an enemy, which is pretty what Pakistan was in 1981. They were either still under marshal law, or had just come out of it in 1981.
Sure Pakistan may have been a dangerous place in 1981. However, the BC Truthers are not saying that Obama visited a dangerous place in 1981. Instead, they are saying that Obama visited Pakistan when it was against the law for Americans to go there.
Why not just say "Obama visited a dangerous country in 1981?"
Why is it they are stating an outright lie regarding the legality of travel to Pakistan in 1981?