There is at least one example of a strong crypotgrpahic algorithm that is known to contain a government backdoor, which is only accessible to the government agency that created it (the NSA). It's called Dual_EC_DRBG, and you can read an answer I recently posted about it, if you wish.
So from a purely technical standpoint, it is possible to engineer an encryption algorithm which has a backdoor that can only be exploited by the government agency that designed it. We know this is possible, because we know it has happened at least once. So, "yes", it is technically possible to create a backdoor which only a particular government agency can access.
Having said that, no, there are no "safe ways to allow the FBI access encrypted devices, but nobody else."
While we can create a backdoor that only the government can walk through, the fundamental problem and danger of doing so (beyond concerns about it being abused by the government agency that uses this backdoor) that cannot be eliminated, is that once that information is walked out that door and stored in other locations, it can be accessed by anyone who can get access to any of those locations. So (complete best case scenario), we go from having information in one place, that is only accessible to you and the FBI, to having that information in many places, and it being accessible to you, the FBI, and anyone who can access wherever the FBI has stored it. Not incidentally, the FBI can't even keep its own information safe, let alone information it has on other people.
And then we go to also having the information stored wherever it's put by the other government agencies the FBI shares it with, and also being accessible to anyone who has access to those locations as well. Thanks to the Department of Homeland Security, that is approximately every national intelligence and law enforcement agency, as well as the majority of state local law enforcement agencies, via "fusion centers." Oh, and, to make it worse, it's not like it's "just" every intelligence agency, law enforcement organization, and courthouse that would have access to your information, either. Perhaps you've heard of the OPM data breach, where 21.5 million people had their personal information (and information on their friends, family and co-workers) stolen. So, it's potentially oversight and administrative agencies too.
And to put a really fine point on this fundamental problem government agencies have with keeping data in their possession safe, let's go back to the Dual_EC_DRBG backdoor thing I opened with.
The whole reason we know, conclusively, that Dual_EC_DRBG contains an NSA-only backdoor is because a man named Edward Snowden accessed the information about this backdoor and shared it with the world (among other things, of course). Importantly, Snowden was not even an NSA employee, but a contractor. This information is/was Top Secret, Sensitive Compartmented Information, which is the most strongly protected categorization of information our government has. This was a piece of information that was so highly protected that the mere act of disclosing it was an act of treason. In theory, it was only accessible to some small number of people within the NSA.
This was a piece of information that was protected by multiple layers of technical protections, multiple layers of processes protections designed to keep it out of unauthorized hands (Snowden's unauthorized hands), and the legal threat of being charged with treason. It wasn't enough. All that couldn't keep it secret. As a brief tangent, our government couldn't keep Top Secret State Department cables and military operations details safe, either... so it's not like Snowden was the only example of a high-profile data breach and leak of large amounts of Top Secret information.
Despite all those protections, this piece of information is now public knowledge, because someone who had access to the NSA's systems, someone not in that small number of NSA employees authorized to know it, accessed it and shared it with everyone.
Since the government can't keep its most closely guarded secrets safe, what hope do you really think there is that it will be able to keep the contents of your iPhone safe?