Shadow foreign secretary says party should be ‘ambiguous’ about circumstances for using the Trident deterrent