The correct choice is 'を撮り' (combining '写真' + 'を' [object] + '撮る' [stem] + 'に行きました' [to go in order to]). The grammar pattern '[Verb Stem] + に行く' expresses purpose of motion (went to take photos). Therefore, '写真を撮りに行きました' is grammatically correct. The other choices ('が撮れ', 'で撮って', 'を撮る') do not combine with 'に行きました' correctly for a transitive action purpose.