Hi,
according the API documentation of salesforce.com is possible access records using the foreign keys
Please see Salesforce Developers at Reference > Core Calls > upsert()
“You can use external ID fields as a foreign key, allowing you to access records in a single step instead of querying a record to get the ID first. To do this, specify the foreign key name and the external ID field value.