Yes you can. What I would do is set up a small list on SharePoint that has the Form name (or some ID), and the GUID and location of your CAML document you are using. Set it up initially to go to library A, and then programmatically switch it to use B.
An example to get you thinking:
Store the GUID as a hidden form attribute and reset it:
MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/@my:H_GUID", this.NamespaceManager).SetValue(assessInfo.SelectSingleNode("@GUID", NamespaceManager).Value);
Resetting the file location of the CAML document you're using to upload:
((FileQueryConnection)this.DataConnections[RECEIVE_ANSWERLIST_CAML]).FileLocation = assessInfo.SelectSingleNode("@CAML_URL", NamespaceManager).Value;
((
FileQueryConnection)this.DataConnections[RECEIVE_ANSWERLIST_CAML]).Execute(); //Force new CAML URL