There is a custom module you can download from http://wiki.lyx.org/Layouts/Modules#toc9 that allows you to add fragile frames (thanks to Liviu Andronic). You can also do the entire frame (including begin and end commands) in raw LaTeX within LyX (Insert > TeX code or Ctrl-L). Unfortunately, the way that the frame environment is implemented is rather arcane, and does not seem to handle the fragile option correctly.
Paul