While USA categorizes Syria as a Terrorist state, there is no state of war between the two countries. USA has some diplomatic relations with Syria and Rice has been in touch with the Syrian authorities. Pelosi trip was approved. If Pelosi had visited Al Kaida leaders Bin Ladin or Zawahiri that would be a problem.
from the article: Arab MKs: Bid to bar trips to enemy states is 'racist'