Bitcoin Core 0.13 -- SENDFROM rpc call
Yes. It's save.
The current transaction submitting logic (CommitTransaction) do report the transaction ID after adding the tx to the local database and to the mempool.
On top, it holds the cs_main and the cs_wallet lock which makes sure not other thread can manipulate the relevant data-structured during the time of AddToWallet and AcceptToMempool.
https://github.com/bitcoin/bitcoin/blob/master/src/wallet/wallet.cpp#L2557

This means, when you call a send* RPC command, you will get response (the txid) after the transaction was submitted to the mempool and added to your local wallet database.

Immediately calling gettransaction is therefore save.