IIRC, this quote comes from ST:TOS Series 1, Episode "The Devil in the Dark". See URL (http://www.maximillian.org/tos/devil.html) for a synopsis (I'd quote it all but that wouldn't be fair use).

Following discovery of the Horta, various people have used phasers on the creature. Kirk asks Bones whether he can patch her up. She's a silicon-based lifeform, though (i.e. a hunk of living rock), so Bones responds "Dammit Jim, I'm a doctor not a bricklayer!"

But out comes the trowel and cement and he gives it a go.