Sure. You could also pre drill some holes for screws and screw it straight into the framing. Then chaulk the seams. Predrill though. The lumber will split if you don't. Oh and be careful not to over tighten or it can split too. Just listen to the wood when putting screws in. It will tell you when it wants to split. You'll know when.
jeremy
jeremy