You could use the UI scripting to open System Preferences choose the Display Perferences pane, switch to the correct tab and so on. But I don't think there is an option in there to turn off a screen? As there is not an option I don't think you'll be able to do it!