i was keeping flagfins in my 55 gal reef, and never had much luck with D. pessuliferus. i've seen some around lately, but most come in pretty darned skinny and i suspect that may be a problem...their digestive systems have probably already shut down due to malnutrition.
if you find some that are already eating well (should be on frozen mysis), you could keep a pair in a 40 gal quite nicely. flagfins are good swimmers and require a bit more room than most pipes. also, they do well in reef setups as opposed to grassbed biotopes.