Simply not true. While Pakistan might have been on the State Dept. warning list in 1981, Americans were never banned from traveling there. In fact, in that same year, Pakistan was considered such an important ally that the Reagan administration sent them $3.2 billion in military and economic aid. This whole "Pakistan travel ban" is nothing but internet rumor with no foundation in reality.
At that time, 1981, Obama’s safety would have been improved traveling under an Indonesian (or Kenyan) passport. For 1981 was the year Anwar Sadat was assassinated, the year of the assassination attempt on Pope John II, the year of the terrorist bombing at USAF Ramstein that killed twenty. The Pakistani terror organization Jamaat ul-Fuqra was formed in 1980. Fundamentalist Muslim terror was on the ascendant.