DTM supports document.write(). The only thing which needs to be kept in mind is to change the syntax of <script> tag within the document.write function.
Hence the piece of code should be modified as :
var value = somevaluegenerated;
document.write('<script src="xyz.js?para1=one¶2=' + value + '"><\/script>');// This line is modified
We have also tested a piece of test code on our end and the code is perfectly working.