It depends on you mean by the "whole play was written." Do you mean that the US had it in for Assange before the accusations came to light? That is certainly true. But exactly what they were doing about it is another matter.
It is possible that one or both of the women were CIA plants, and there have been suggestions to that effect http://www.counterpunch.org/shamir09142010.html
. However, while this is a plausible story, it doesn't seem likely nor is it necessary to explain events.
Several things to remember: 1) Assange was trying to gain Swedish citizen at the time; 2) so, the US would have reason to put pressure on Sweden about the issue; 3) Sweden's interests mostly align with those of the US and they probably don't want to become known as a haven for international Robin Hoods, so they had their own reasons for not wanting to grant Assange a citizenship; 4) rape laws in Sweden have the lowest evidential bar in the entire world, essentially a woman can decide at any time after sex that she was assaulted, even if it was apparently mutual and she seemed to enjoy it; 5) there is a history in Sweden of women using these laws to their advantage, such as suing for large sums of money, that is has nothing to do with governmental pressure; 6) ultimately, it doesn't matter whether Assange is found innocent or guilty (for the US it would be a bonus, but not necessary), simply the charge of rape is enough to tarnish his image.
So, I would suggest that if we were to be able to Wikileaks the behind the scenes chatter we would probably see some diplomatic pressure from the US on Sweden to find a way to deny Assange citizenship. We would likely also see internal pressure within the Swedish establishment to deny Assange citizenship. We would probably also see that he was watched closely by the authorities. When his sexual escapades came to light, it was hard to miss since one of the women tweeted them all over the net and the other texted to all her friends, there may or may not have been some suggestions given to those women that maybe he didn't treat them as nicely as they would have liked. However, it is also quite likely that the women came to the conclusion to accuse him on their own, given that some Swedish woman have used these laws for less than upright purposes. The "coincidence" of two women charging Assange at the same time can easily be explained by the fact that they talked to each other beforehand. Regardless of whether these charges were influenced by suggestion or not, the Swedish government certainly jumped at the opportunity.
So, while it is possible that there were deep machinations involved, the events can easily be explained by conjunction of governmental business as usual (basic diplomatic pressure, and pressures internal to the Swedish system), Swedish rape laws, chance and jumping on opportunities when they arise.