SD card problem- card initialized but error opening datalog.txt

  digitalWrite(LED, HIGH);

Your LED is connected to pin 13. An a 328-based Arduino, that is one of the SPI pins. You can NOT use this pin for other things, since the SD shield uses SPI to communicate with the Arduino.